package code.hkgolden.android.core;

import java.util.concurrent.Callable;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import android.app.Application;
import code.framework.android.util.ExecutorFacade;

import com.google.inject.Guice;
import com.google.inject.Injector;

public class HkgoldenApplication extends Application {

	public Injector guiceInjector;

	private ExecutorFacade executorFacade = new ExecutorFacade(1);
	
	private HkgoldenTaskManager hkgoldenTaskManager = new HkgoldenTaskManager();

	private final Logger logger = LoggerFactory.getLogger(getClass());

	public void submit(Callable<?> callable) {
		executorFacade.submit(callable);
	}

	@Override
	public void onCreate() {
		logger.debug("onCreate()");
		guiceInjector = Guice.createInjector(new HkgoldenModule());
	}

	public HkgoldenTaskManager getHkgoldenTaskManager() {
		return hkgoldenTaskManager;
	}

}
